package com.z.kq.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.z.common.web.vo.request.PageVo;
import com.z.kq.entity.Sign;
import com.z.kq.mapper.SignMapper;
import com.z.kq.service.ISignService;
import org.springframework.stereotype.Service;

import java.util.List;
/**
 * 打卡记录Service业务层处理
 *
 * @author z
 * @date 2023-09-28
 */
@Service
public class SignServiceImpl extends ServiceImpl<SignMapper,Sign> implements ISignService {


    /**
     * 查询打卡记录
     * @param sign 打卡记录
     * @param pageVo
     * @return 打卡记录 分页集合
     * */
    @Override
    public PageInfo<Sign> selectSignPage(Sign sign, PageVo pageVo) {
        PageHelper.startPage(pageVo.getPage(), pageVo.getLimit());
        List<Sign> data = selectSignList(sign);
        return new PageInfo<>(data);
    }

    @Override
    public List<Sign> selectSignList(Sign sign) {
        List<Sign> data = baseMapper.selectSignList(sign);
        return data;
    }
}
